@import '~@/styles/variables.less';
@import '~@/styles/animation.less';

.player-bg {
  width: 100vw;
  position: fixed;
  bottom: 0;
  padding-bottom: constant(safe-area-inset-bottom);
  padding-bottom: env(safe-area-inset-bottom);
  left: 0;
  font-size: 12px;
  user-select: none;
  box-shadow: 0 -1px 3px @player-wrapper-background;
  background-color: @player-wrapper-background;
  color: @player-wrapper-color;
  z-index: 758943649;
}

.player-wrapper {
  width: 980px;
  height: @player-wrapper-height;
  margin: auto;
  padding: 10px;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;

  .item-t-s:hover {
    text-shadow: 0 0 5px @player-wrapper-color;
  }

  .wrapper-controller {
    display: flex;
    padding: 0 20px;

    .item-controller-btn {
      margin: 0 5px;
      cursor: pointer;
    }
  }

  .wrapper-middle {
    width: calc(100% - 126px - 156px);
    height: 100%;
    display: flex;
    align-items: center;

    .item-audio-cover {
      width: 34px;
      height: 34px;
      min-width: 34px;
      min-height: 34px;
      margin-right: 10px;
      box-shadow: 0 0 2px darken(@player-wrapper-background, 20%);
      border-radius: 4px;
      cursor: pointer;
    }
  }

  .wrapper-audio {
    width: calc(100% - 89px - 44px);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .item-audio-info {
    display: flex;
    user-select: text;

    >div {
      margin-right: 10px;
      white-space: nowrap;
      cursor: pointer;
      overflow: hidden;

      &:last-child {
        margin-right: 0;
      }

      >span.active {
        position: relative;
        animation: name-move 8s 0.5s infinite linear;
      }
    }
  }

  .progress-wrapper {
    width: 100%;
    position: relative;

    .item-progress {
      height: 9px;
      border-radius: 30px;
      background-color: darken(@player-wrapper-background, 20%);
      box-shadow: 0 0 2px darken(@player-wrapper-background, 20%);
      overflow: hidden;
    }

    .item-progress-played {
      width: 30%;
      height: 100%;
      position: absolute;
      top: 0;
      left: 0;
      z-index: 1;
      border-radius: 30px;
      background-color: @player-progress-btn;
    }

    .item-progress-loaded {
      width: 40%;
      height: 100%;
      position: absolute;
      top: 0;
      left: 0;
      z-index: 0;
      border-radius: 30px;
      background-color: lighten(@player-progress-btn, 20%);
      transition: all 3s;
    }

    .item-progress-btn {
      width: 8px;
      height: 8px;
      position: absolute;
      top: 50%;
      left: 30%;
      z-index: 2;
      transform: translateY(-50%) translateX(-50%);
      border: 3px solid #fff;
      border-radius: 50%;
      background-color: @player-progress-btn;
      box-shadow: 0 0 2px darken(@player-progress-btn, 20%);
      cursor: pointer;
    }
  }

  .wrapper-timer {
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding: 0 5px;
    position: relative;
    top: 3px;
    font-size: 13px;

    >span {
      margin: 0 5px;
    }

    div:last-child {
      color: darken(@player-wrapper-color, 20%);
    }
  }

  .wrapper-controller-other {
    display: flex;
    padding-left: 20px;

    >div {
      width: 25px;
      height: 25px;
      line-height: 25px;
      margin-right: 10px;
    }

    .item-list {
      position: relative;
      display: flex;
      align-items: center;

      >span {
        display: block;
        min-width: 30px;
        height: 18px;
        line-height: 18px;
        text-align: center;
        font-size: 12px;
        font-weight: bold;
        border-radius: 0 30px 30px 0;
      }
    }
  }
}